<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>操作日志</title>
		<link href="<%=application.getContextPath()%>/nresources/ued/css/all-src.css" type="text/css" rel="stylesheet" />
		<%@include file="/WEB-INF/ibnms/common/easyui.jsp" %>
		<%@include file="/WEB-INF/ibnms/common/jqgrid.jsp"%>
		<%@ include file="/WEB-INF/ibnms/common/jsCommonVariables.jsp"%>
	</head>
<body>
<div class="form-wrapper">
	<div class="box-in">
	  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-03">
	   <thead>
	   <tr>
	         <td width="100%" class="monitor_bg1" colspan="12"  height="13" align ="right" nowrap>用户ID或姓名：<input type="text" class="input-style1" name="theForm.LOGIN_ID"/>
	         <input type="button"class="btn-style02" id="btn-search" value="模糊查询" /></td>
	   </tr>
	   </thead> 
	  </table>
	</div>
	<div class="title-style"><a class="fold-tip"></a></div>
	<div class="block02">
		<table id="gridTable">
		</table>
		<div id="gridPager">
		</div>
	</div>
</div>
	<script type="text/javascript">
		$(function(){
			$(".title-style a.fold-tip").toggle(toggletip,toggletip);
			function toggletip() {
				if ($(this).attr("class").split("unfold-tip").length > 1) {
					$(this).removeClass("unfold-tip");
					$(this).parents().prev(".box-in").show("fast");
				} else {
					$(this).addClass("unfold-tip");
					$(this).parents().prev(".box-in").hide("fast");
				}
			}
			$('#sel1').click(function(){
									  var height = $(window.parent.document.getElementById('sideframe')).height();
					$(window.parent.document.getElementById('sideframe')).css("display","none").next(".sideframe-collapse").css({"display":"block","height":height});
			})
		})
		$(function(){$("#gridTable").jqGrid({
				url: "loadListLogQueryJson.do",
				datatype: "json",
				mtype: "POST",
				height: "100%",
				autowidth: true,
				colNames:['id', '用户ID', '用户名', '操作', '操作日期'],
				colModel:[
					{name:'ID',index:'ID',hidden:true},
					{name:'LOGIN_ID',index:'LOGIN_ID'},
					{name:'NAME',index:'NAME'},
					{name:'CN_NAME',index:'CN_NAME'},
					{name:'OPERATE_TIME',index:'OPERATE_TIME'}
				],
				viewrecords: true,
				rowNum: 15,
				rowList: [10,15,30],
				sortname: 'OPERATE_TIME',
				jsonReader: {
					root: 'rows',
					page: 'page',
					total: 'total',
					records: 'records',
					repeatitems: false,
					subgrid: {
				        root: 'rows',
						page: 'page',
						total: 'total',
						records: 'records',
						repeatitems: false
				    }      
				},
				pager: "#gridPager",
				hidegrid: true,
				beforeRequest:function(){
					var postData = {};
					$(":input[name^='theForm.']").each(function(){
						postData[$(this).attr("name")] = $(this).val();
					});
					$.extend($("#gridTable").getGridParam("postData"), postData);
				},
				subGrid : true,
				subGridUrl: 'loadLogContent.action',
			    subGridModel: [{ name  : ['详细信息'], 
			                    width : [800],
			                    params: ['ID'],
			                    align : ['center'] , 
			                    mapping: ['TITLE_EXPRESSION']
			                   } 
			    			  ]
			});
			
		}); 
		$("#btn-search").click(function(){
			$("#gridTable").trigger("reloadGrid",[{page:1}]);
		});
	</script>
</body>
</html>
